package com.codejam.enums.demo.controller;

import com.codejam.enums.demo.dto.req.TestReq;
import com.codejam.enums.demo.dto.InnerClass;
import com.codejam.enums.demo.dto.res.TestRes;
import com.codejam.enums.demo.enums.WeekEnum;
import java.util.ArrayList;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zss
 * @date 2022/6/10 9:19
 * @Email:451682479@qq.com
 */
@RestController
@RequestMapping("/test")
public class TestController {

    @PostMapping("/test1")
    public Void test1(@Validated @RequestBody TestReq req){

        int a =1;
//        TestRes res = new TestRes();
//
//        res.setWeek(WeekEnum.MONDAY);
//
//        List<WeekEnum> weeks = new ArrayList<>();
//        weeks.add(WeekEnum.MONDAY);
//        weeks.add(WeekEnum.TUESDAY);
//        res.setWeeks(weeks);
//
//        InnerClass innerClass = new InnerClass();
//        innerClass.setInnerWeek(WeekEnum.TUESDAY);
//        innerClass.setInnerWeeks(weeks);
//        innerClass.setInteger(WeekEnum.WEDNESDAY);
//        res.setInnerClass(innerClass);
//
//        return res;
        return null;
    }
}
